<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex courseSections_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex flex-wrap align-center justify-between courseSections_fd0_0'      >
            <view   class='flex flex-wrap align-center courseSections_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  courseSections_fd0_0_c0_c0'  >&#xE794;</text>
</view>
    <view   class='flex flex-wrap align-center'      >
        <text class='courseSections_fd0_0_c1_c0'  >课程章节</text>
</view>
    <view   class='flex align-center justify-end courseSections_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/addChapter/addChapter?course_id=${class_id}`"   >
        <text   >添加章节</text>
</view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex flex-wrap align-center benben-flex-layout courseSections_flex_1"    >
            <template v-for = '(item,key0) in classList'>
    <view   class='flex flex-direction align-stretch courseSections_fd1_0'   @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/chapterDetails/chapterDetails?id=${item.aid}`"    :key='key0'>
        <image class='courseSections_fd1_0_c0'  mode="aspectFill"  :src='item.cover'></image>
<image class='courseSections_fd1_0_c1'  mode="aspectFit"  :src='STATIC_URL+"115.png"'></image>
    <view   class='flex flex-wrap align-center courseSections_fd1_0_c2'      >
        <text class='flex-sub courseSections_fd1_0_c2_c0'  >{{item.wenben}}</text>
</view>
</view>
    </template>
    <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
</view>
        
<!---flex布局flex布局结束-->
    
    
        </view>
    </view>
</template>
<script>
    import pagingList from '@/common/mixin/paging_list.js';
import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        mixins: [pagingList],
        
        data(){
			return {"minixPagingListsApi":"","pageingListApiMethod":"","allowOnloadGetList":false,"classList":[],"class_id":""};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            let {class_id}=options
if (class_id !== undefined) this.class_id = class_id
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            this.getChapterFunc()
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            this.getChapterFunc()
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //获取章节列表
                 getChapterFunc(){
                                    this.minixPagingListsApi = global.apiUrls.post6524f87b85580;
                this.pageingListApiMethod = 'get';
                this.allowOnloadGetList = false;
                this.pagingListPostDataContent = {fid:this.class_id}
                this.listData = [];
                this.classList = this.listData;
                this.pagingListToggle();
                
                },
                pagingListPostData(){
                    return this.pagingListPostDataContent
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:#F8F8F8;background-size: 100% auto;
        }
    .courseSections_flex_0{
        border-bottom:1px solid #eee;background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .courseSections_fd0_0_c1_c0{
        font-size:36rpx;font-weight:500;color:#333333;
    }
    .courseSections_fd0_0_c0_c0{
        font-size:36rpx;color:#333;font-weight:500;
    }
    .courseSections_fd0_0_c0{
        width:140rpx;height:88rpx;
    }
    .courseSections_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;line-height:88rpx;
    }
    .courseSections_flex_1{
        padding:24rpx 19rpx 0rpx 19rpx;
    }
    .courseSections_fd1_0_c2_c0{
        color:#374047;font-size:28rpx;font-weight:500;line-height:33rpx;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .courseSections_fd1_0_c2{
        margin:24rpx 24rpx 24rpx 24rpx;height:66rpx;
    }
    .courseSections_fd1_0_c1{
        width:48rpx;height:48rpx;border-radius:0rpx 0rpx 0rpx 0rpx;position:absolute;right:148rpx;top:150rpx;
    }
    .courseSections_fd1_0_c0{
        width:346rpx;height:346rpx;border-radius:16rpx 16rpx 0rpx 0rpx;
    }
    .courseSections_fd1_0{
        background:var(--benbenbgColor1);border-radius:16rpx 16rpx 16rpx 16rpx;box-shadow:0rpx 6rpx 25rpx rgba(0,0,0,0.1);margin:0rpx 5rpx 24rpx 5rpx;position:relative;width:346rpx;
    }
</style>